import request from '@/utils/request';

// 查询文件存储列表
export function listStorage(query) {
	return request({
		url: '/mall/storage/list',
		method: 'post',
		data: query,
	});
}

// 查询文件存储详细
export function getStorage(id) {
	return request({
		url: '/mall/storage/getInfo',
		method: 'post',
		data: { id: id },
	});
}

// 新增文件存储
export function addStorage(data) {
	return request({
		url: '/mall/storage/add',
		method: 'post',
		data: data,
	});
}

// 编辑文件存储
export function updateStorage(data) {
	return request({
		url: '/mall/storage/edit',
		method: 'post',
		data: data,
	});
}

// 删除文件存储
export function delStorage(id) {
	return request({
		url: '/mall/storage/remove',
		method: 'post',
		data: { id: id },
	});
}

// 导出文件存储
export function exportStorage(query) {
	return request({
		url: '/mall/storage/export',
		method: 'post',
		params: query,
	});
}
